package io.vov.vitamio;

import io.vov.vitamio.db.DatabaseHelper;
import io.vov.vitamio.db.OrmLiteBaseApplication;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;

import com.j256.ormlite.android.apptools.OpenHelperManager;
import com.j256.ormlite.android.apptools.OpenHelperManager.SqliteOpenHelperFactory;
import com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper;

/**
 * Application 对象,主要管理数据库操作
 * 
 * @author lichuan
 */
@SuppressWarnings("rawtypes")
public class TVApplication extends OrmLiteBaseApplication<DatabaseHelper> {

	static {
		OpenHelperManager.setOpenHelperFactory(new SqliteOpenHelperFactory() {
			public OrmLiteSqliteOpenHelper getHelper(Context context) {
				return new DatabaseHelper(context);
			}
		});
	}

	private static TVApplication instance;
	private String mCurrentTab = "频道";
	public static TVApplication getInstance() {
		return instance;
	}

	@Override
	public void onCreate() {
		super.onCreate();
		instance = this;
	}
	public String getCurrentTab() {
		return mCurrentTab;
	}

	public void setCurrentTab(String CurrentTab) {
		this.mCurrentTab = CurrentTab;
	}
	
	}
